package com.example.cpopcopy.tools;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-10-17
 * Time: 11:24
 */
@Data
public class ResponseMessage<T> {
    //对返回的数据的统一封装
    private int status; //状态码
    private String message; //返回的信息 true/false
    private T data; // 返回给前端的Body的数据  泛型类

    public ResponseMessage(int status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }
    //body有很多的数据类型 直接封装成一个泛型
}
